﻿using JustSiteWorkrole.DAL;
using JustSiteWorkrole.Helper;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;

namespace JustSiteWorker.Controllers
{
    public class RepController : Controller
    {
        protected Repository repos = new Repository();
        protected override void Dispose(bool disposing)
        {
            repos.Dispose();
            base.Dispose(disposing);
        }
    }

    [SessionExpireFilter]
    public class BaseController : RepController
    {
        public int UserId
        {
            get
            {
                return Session["Id"] == null
                    ? 0
                    : (int)Session["Id"];
            }
        }
    }
}
